-
-
Notifications
You must be signed in to change notification settings - Fork 150
Enable autoupdate #582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable autoupdate #582
Conversation
.github/workflows/release.yml
Outdated
- name: Identify Prerelease | ||
# This is a workaround while waiting for create-release action to implement auto pre-release based on tag | ||
id: prerelease | ||
run: | | ||
wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.1.0.zip | ||
unzip -p /tmp/3.1.0.zip semver-tool-3.1.0/src/semver >/tmp/semver && chmod +x /tmp/semver | ||
if [[ $(/tmp/semver get prerel ${GITHUB_REF/refs\/tags\//}) ]]; then echo "::set-output name=IS_PRE::true"; fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Step required because we do not want to push auto-update files in case of a pre-release
.github/workflows/release.yml
Outdated
- name: Create autoupdate files | ||
run: ${GOPATH}/bin/go-selfupdate arduino-create-agent${{ matrix.ext }} ${TAG_VERSION} # this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file | ||
if: steps.prerelease.outputs.IS_PRE != 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.github/workflows/release.yml
Outdated
if: steps.prerelease.outputs.IS_PRE != 'true' | ||
|
||
- name: Upload autoupdate files to Arduino downloads servers | ||
run: aws s3 sync public/ s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.TARGET }} --include "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the upload target should be correct: env.TARGET = "/CreateBridge/"
, so the full path will be:
http://downloads.arduino.cc/CreateBridge/
So pushing all the files inside public
should result in:
http://downloads.arduino.cc/CreateBridge/linux-amd64.json
http://downloads.arduino.cc/CreateBridge/1.2.0/linux-amd64.gz
Good news 🥳 : This is what I did to test autoupdate:
|
Apparently, the problem comes from the fact that |
Fix incoming in #583 |
Currently we only use BinURL for autoupdate (full bin)
e98756e
to
8a6dee8
Compare
49ffa0e
to
60aefb8
Compare
changed also on create-release for uniformity
ea31785
to
46ae0a4
Compare
This reverts commit 506a1ca.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* add new error since DiffURL is not used (no patch bin) and optimize code * add first implementation of auto-update to release workflow * fix go-selfupdate not being found * use globally bash (for win compatibility) and move comment * uniform test.yml to release.yml
Please check if the PR fulfills these requirements
before creating one)
feature, CI
auto-update is not enabled
With this PR I will enable auto-update in the CI and I'll make some fixes in the auto-update related code
no